"""


    PAL - Python for Ableton Live

    Using this in Live Pref "Control Surface" will only test 
    the package, nothing really interesting here for users :p
    
"""

import liveControl

def create_instance(c_instance):
    """
    This is called when you set the "Control Surface to PAL"
    """
    # We use the basic controler:
    return liveControl.LiveControl( c_instance, name='Tester' )
    
def Test():
    """
    Test the PAL module using a mocked Live.
    """
    print "Testing..."
    #import tools
    #tools.SetupTests()
    import LiveMock as Live
    pal = create_instance( Live.c_instance() )
    pal.disconnect()
    print "Ok."
    
if __name__ == "__main__":
    """
    This is called only when you run this file in a python interpreter.
    I use it to validate code syntaxe and run tests.
    """
    Test()
